<template>
  <div>
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="item in banner" :key="item.id">
        <img :src="$pre + item.img" alt="">
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import { mapActions, mapGetters } from 'vuex'
export default {
    computed:{
      ...mapGetters({
        banner:"home/banner"
      })
    },
    methods:{
      ...mapActions({
        reqbanner:"home/reqbanner"
      })
    },
    mounted(){
      this.reqbanner()
    }
}
</script>
<style scoped>
.my-swipe{
    height: 4rem;
}
img {
  width: 100%;
  height: 100%;
}
</style>